import axioGet from '../libs/http'

function getData(type){
    return new Promise((resolve,reject)=>{
        axioGet({
            url:`https://api.apiopen.top/getJoke?page=1&count=2&type=${type}`,
            success(data){
                resolve(data.data)
                console.log(data);
            },
            error(err){
                reject(err)
            }
        })
    })
}


export {
    getData
}